<?php
    $height = 240;
	$width = 360;
	$image = imagecreatetruecolor($width, $height);
	$line = imagecolorallocate($image, randColor(), randColor(), randColor());
	$background = imagecolorallocate($image, randColor(), randColor(), randColor());
	
	imagefill($image, $width, $height, $background);
	imageline($image, randX(), randY(), randX(), randY(), $line);
	imagestring($image, 4, randX(), randY(), "Image", $line);
	
	header('content-type: image/png');
	imagepng($image);
	
	imagedestroy($image);
	
	function randColor(){
		return mt_rand(0, 255);
	}
	
	function randX(){
		return mt_rand(0, 360);
	}
	
	function randY(){
		return mt_rand(0, 240);
	}
?>